home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 7 / Amiga Format AFCD07 (Dec 1996, Issue 91).iso / serious / shareware / programming / aros / intuition / makefile < prev    next >
Makefile  |  1996-09-13  |  1KB  |  42 lines

  1. TOP=..
  2.  
  3. include $(TOP)/make.cfg
  4.  
  5. FILES = addclass activatewindow closewindow disposeobject drawborder \
  6.     drawimage freeclass getattr makeclass modifyidcmp modifyprop \
  7.     newobjecta openwindow printitext refreshgadgets refreshglist \
  8.     removeclass setattrsa setwindowtitles sizewindow
  9.  
  10. all: setup $(OSGENDIR)/intuition_init.o $(OSGENDIR)/intuition_functable.o \
  11.     $(OSGENDIR)/intui_x11.o \
  12.     $(foreach f,$(FILES),$(OSGENDIR)/$(f).o)
  13.  
  14. setup :
  15.     @if [ ! -d $(OSGENDIR) ]; then $(MKDIR) $(OSGENDIR) ; fi
  16.  
  17. clean:
  18.     $(RM) $(OSGENDIR) *.err
  19.  
  20. $(OSGENDIR)/intui_x11.o: intui_x11.c
  21.     $(CC) $(CFLAGS) $(X11CCFLAGS) $< -c -o $@ 2>&1|tee $*.err
  22.     if test ! -s $*.err; then rm $*.err; fi
  23.  
  24. $(OSGENDIR)/%.o: %.c
  25.     $(CC) $(CFLAGS) $< -c -o $@ 2>&1|tee $*.err
  26.     if test ! -s $*.err; then rm $*.err; fi
  27.  
  28. intuition_functable.c : $(foreach f,$(FILES),$(f).c) \
  29.         $(TOP)/scripts/makefunctable.awk
  30.     gawk -f $(TOP)/scripts/makefunctable.awk \
  31.         --assign lib=Intuition \
  32.         $(foreach f,$(FILES),$(f).c)
  33.  
  34. $(OSGENDIR)/%.d: %.c
  35.     @if [ ! -d $(OSGENDIR) ]; then $(MKDIR) $(OSGENDIR) ; fi
  36.     @$(RM) $@
  37.     @touch $@
  38.     $(MKDEPEND) -f$@ -p$(OSGENDIR)/ -- $(CFLAGS) -- $^
  39.  
  40. include $(foreach f,$(FILES),$(OSGENDIR)/$(f).d)
  41.  
  42.